package com.walker.jdkapi.thread.pool;

import java.util.concurrent.Callable;

public class MyFuture implements Callable<String> {

	private String parameter;

	public MyFuture(String parameter) {
		this.parameter = parameter;
	}

	/**
	 * 这里是真实的业务逻辑，其执行可能很慢
	 */
	@Override
	public String call() throws Exception {
		// 模拟执行耗时
		Thread.sleep(3000);
		String result = this.parameter + "处理完成";
		return result;
	}

}
